package io.renren.modules.api.controller;


import io.renren.common.utils.ConstantUtils;
import io.renren.common.utils.R;
import io.renren.common.validator.Assert;
import io.renren.modules.api.annotation.AuthIgnore;
import io.renren.modules.slideshow.entity.SlideshowEntity;
import io.renren.modules.slideshow.service.SlideshowService;
import io.renren.modules.user.entity.UserinfosEntity;
import io.renren.modules.user.service.UserinfosService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 注册
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-03-26 17:27
 */
@RestController
@RequestMapping("/api/homepage")
public class ApiSlideShowController {
    @Autowired
    private SlideshowService slideshowService;



    /**
     * 获取轮播图
     */
    @AuthIgnore
    @GetMapping("/slideshow")
    public R register(){
        List<SlideshowEntity> slideshowEntities = slideshowService.apiqueryList();
        return R.ok().put("data",slideshowEntities);
    }
}
